package com.zhuifeng.orders.mapper;

import java.util.List;
import com.zhuifeng.orders.domain.Orders;
import com.zhuifeng.orders.domain.OrdersDetails;
import com.zhuifeng.orders.domain.OrdersEcho;
import org.apache.ibatis.annotations.Param;

/**
 * 订单Mapper接口
 * 
 * @author zhuifeng
 * @date 2022-08-18
 */
public interface OrdersMapper 
{
    /**
     * 查询订单
     * 
     * @param ordersId 订单主键
     * @return 订单
     */
    public Orders selectOrdersByOrdersId(String ordersId);

    /**
     * 查询订单列表
     * 
     * @param orders 订单
     * @return 订单集合
     */
    public List<Orders> selectOrdersList(Orders orders);

    /**
     * 新增订单
     * 
     * @param orders 订单
     * @return 结果
     */
    public int insertOrders(Orders orders);

    /**
     * 修改订单
     * 
     * @param orders 订单
     * @return 结果
     */
    public int updateOrders(Orders orders);

    /**
     * 删除订单
     * 
     * @param ordersId 订单主键
     * @return 结果
     */
    public int deleteOrdersByOrdersId(String ordersId);

    /**
     * 批量删除订单
     * 
     * @param ordersIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteOrdersByOrdersIds(String[] ordersIds);

    /**
     * 确认收货修改状态
     * @param orderId
     */
    void confirmReceiptUpdateState(@Param("orderId") String orderId);

    /**
     * 添加订单信息
     * @param orders
     */
    void addOrders(Orders orders);

    /**
     * 添加订单详情
     * @param ordersDetails
     * @param userid
     */
    void addOrdersDetails(@Param("ordersDetails") OrdersDetails ordersDetails, @Param("userid") Long userid);

    OrdersEcho selectProductId(@Param("productSkuId") String productSkuId);

}
